<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
	<th:block th:include="include :: header('转岗记录表')" />
	<th:block th:include="include :: businessCSS" />
</head>
<body class="no-skin">
<div class="main-container" id="main-container">
	<div class="main-content">
	<form class="layui-form head-form">
	    <div class="north">
	       	<th:block th:include="include :: business_btn" />
	        <th:block th:include="include :: business_tpl('top')" />
	        <!-- 静态表格 -->
		    <div style="margin:10px">
			  	<table class="layui-table" lay-size="sm">
			    <colgroup>
			      <col width="16.6%">
			      <col width="16.6%">
			      <col width="16.6%">
			      <col width="16.6%">
			      <col width="16.6%">
			      <col width="16.6%">
			    </colgroup>
				<thead>
			      <tr>
			        <th colspan="6">原岗位信息</th>
			      </tr>
			    </thead>
			    <tbody>
		    	  <tr>
			        <td class="table-title">姓名</td>
			        <td th:if="${!gridColumns.readOnly}" onclick="getMore('cUserName',null,'员工','ts_userinfo');">
			        	<input type="text" id="cUserName" name="cUserName" class="layui-input" readonly/>
			        	<i class="layui-icon layui-icon-more getMore" style="position:absolute"></i>
		        	</td>
		        	<td th:if="${gridColumns.readOnly}">
			        	<input type="text" id="cUserName" name="cUserName" class="layui-input" readonly/>
		        	</td>
			        <td class="table-title">原公司</td>
			        <td class="canntEdit"><input type="text" id="cCidName" name="cCidName" autocomplete="off" class="layui-input canntEdit" readonly></td>
			        <td class="table-title">原部门</td>
		        	<td class="canntEdit"><input type="text" id="cDeptName" name="cDeptName" autocomplete="off" class="layui-input canntEdit" readonly></td>
			      </tr>
		    	  <tr>
			        <td class="table-title">入职时间</td>
			        <td><input type="text" id="dRzSj" name="dRzSj" autocomplete="off" readonly class="layui-input" lay-verify="date" placeholder="请选择时间"/></td>
			        <td class="table-title">原职位</td>
		        	<td class="canntEdit"><input type="text" id="cPosition" name="cPosition" autocomplete="off" class="layui-input canntEdit" readonly/></td>
			        <td class="table-title">薪资情况</td>
			        <td><input type="text" id="vXzQkY" name="vXzQkY" autocomplete="off" class="layui-input"></td>
			      </tr>
		      	</tbody>
				<thead>
			      <tr>
			        <th colspan="6">新岗位信息</th>
			      </tr>
			    </thead>
			    <tbody>
		    	  <tr>
			        <td colspan="2"></td>
			        <td class="table-title">调入公司</td>
		        	<td class="canntEdit">
			        	<input type="text" id="sCidName" name="sCidName" class="layui-input canntEdit" readonly/>
		        	</td>
			        <td class="table-title">调入部门</td>
			        <td th:if="${!gridColumns.readOnly}" onclick="getMore('sDeptName',null,'调入部门','ts_organizationinfo');">
			        	<input type="text" id="sDeptName" name="sDeptName" autocomplete="off" class="layui-input" readonly>
			        	<i class="layui-icon layui-icon-more getMore" style="position:absolute"></i>
		        	</td>
		        	<td th:if="${gridColumns.readOnly}">
			        	<input type="text" id="sDeptName" name="sDeptName" autocomplete="off" class="layui-input" readonly>
		        	</td>
			      </tr>
		    	  <tr>
			        <td class="table-title">调入时间</td>
			        <td><input type="text" id="dZySj" name="dZySj" autocomplete="off" readonly class="layui-input" lay-verify="date" placeholder="请选择时间"/></td>
			        <td class="table-title">新职位</td>
			        <td th:if="${!gridColumns.readOnly}">
			        	<input type="text" id="sPosition" name="sPosition" autocomplete="off" class="layui-input" onkeyup="inputMatch('sPosition','sPositionGuid')"/>
			        	<i class="layui-icon layui-icon-more getMore" style="position:absolute" onclick="getMore('sPosition',null,'新职位','ts_roleinfo');"></i>
		        	</td>
		        	<td th:if="${gridColumns.readOnly}">
			        	<input type="text" id="sPosition" name="sPosition" class="layui-input" readonly/>
		        	</td>
			        <td class="table-title">薪资情况</td>
			        <td><input type="text" id="vXzQkX" name="vXzQkX" autocomplete="off" class="layui-input"></td>
			      </tr>
		      	</tbody>
			  </table>
		  	</div>
    	</div>
	   	<th:block th:include="include :: pageFooter" /> 
        </form>
	</div>
</div>
<th:block th:include="include :: footer" />
<th:block th:include="include :: businessJS" />
<th:block th:include="include :: inlineJS" />
<script type="text/javascript">
var $,layer,form,laydate,element;//定义layui模块
var noTable,nid = $("#nid").val()//定义全局参数
layui.use(['laydate','form','layer','jquery','util','element'], function () {
 	$ = layui.$,layer = layui.layer,form = layui.form,laydate = layui.laydate,util = layui.util,element=layui.element;
 	beforeInit();//表单初始化之前的动作集合
 	if(!gridColumns.readOnly){
 		laydate.render({elem:'#dRzSj'});
 		laydate.render({elem:'#dZySj'});
 	}
 	layui.element.render();
 	$.get("/hr/personneltransfer/listbynid?nid="+nid,function(res){
		noTable=res.data;
	});
 	$.each(t_fields,function(v,k){//初始赋值
 		$('#'+k.fields).val(k.fieldContent);
 	})
 	if(gridColumns.readOnly){//流程结束后静态表格变为不可编辑
 	 	$('table input').attr('readonly','readonly');
		$('table .canntEdit').removeClass('canntEdit');
 	}
 	form.render();
})
function inputMatch(i,v){
	$('#'+v).val($('#'+i).val());
}
</script>
</body>
</html>